﻿<?php
include("includes/header.php");
include("includes/conf.php");
?>

	<form method="GET" action="#">
		<?php
			echo '<center><img src="images/gogole.jpg" alt="Logo"/></center><br/>';
			// Barre de recherche
			if (isset($_GET['search']) && !empty($_GET['search'])) {
				$value=$_GET['search'];
			} else {
				$value="";
			}
			echo '<center><input type="text" name="search" id="search" placeholder="Saisissez votre recherche" size="40" value="'.$value.'" /></center>';
			
			// Bouton recherche
			echo '<center><input type="submit" value="Rechercher"/></center>';
		?>
	</form>
	<br/><br/>
	<a href="comparator.php"><center><input type="submit" value="Comparateur de r&eacute;sultats"/></center></a>
	<a href="testFonctionsSparql.php"><center><input type="submit" value="Test des fonctions SPARQL"/></center></a>
<hr/>
<?php
	if (isset($_GET['search']) && !empty($_GET['search'])) {
	
		// Traitement de la requête
		$results = search($value=$_GET['search']);
		
		echo display_results($results, 25);
	}
include("includes/footer.php");
?>
